import { Column, Entity, PrimaryGeneratedColumn, CreateDateColumn, UpdateDateColumn } from 'typeorm';
import { BaseEntity } from 'src/common/entities/base';
import { ApiProperty } from '@nestjs/swagger';

@Entity('edu_campus', {
  comment: '校区表',
})
export class CampusEntity extends BaseEntity {
  @PrimaryGeneratedColumn({ type: 'int', name: 'campus_id', comment: '校区ID' })
  public campusId: number;

  @ApiProperty({ description: '校区编码' })
  @Column({ type: 'varchar', name: 'campus_code', length: 200,default:null, comment: '校区编码' })
  public campusCode: string;

  @ApiProperty({ description: '校区名称' })
  @Column({ type: 'varchar', name: 'campus_name', length: 200, default:null,  comment: '校区名称' })
  public campusName: string;

  @ApiProperty({ description: '归属学校' })
  @Column({ type: 'int', name: 'school_id',default:null, comment: '归属学校' })
  public schoolId: number;

  @ApiProperty({ description: '行政区域' })
  @Column({ type: 'varchar', name: 'origin', length: 128,default:null, comment: '行政区域' })
  public origin: string;

  @ApiProperty({ description: '经纬度' })
  @Column({ type: 'varchar', name: 'position', length: 128, default:null,comment: '经纬度' })
  public position: string;

  @ApiProperty({ description: '地址信息' })
  @Column({ type: 'varchar', name: 'address', length: 128, default:null,comment: '地址信息' })
  public address: string;

  @ApiProperty({ description: '联系人' })
  @Column({ type: 'varchar', name: 'contact_name', length: 128,default:null, comment: '联系人' })
  public contactName: string;

  @ApiProperty({ description: '联系电话' })
  @Column({ type: 'varchar', name: 'contact_phone', length: 128,default:null, comment: '联系电话' })
  public contactPhone: string;
}
